import axios from '../utils/axios';
import { baseUrl } from '../utils/env';
const baseURL = `${baseUrl}/api/file/`;

//上传文件
export const uploadFileApi = (formData: FormData) => {
    return axios.post(`${baseURL}upload`, formData);
}

//根据id删除文件
export const deleteFileApi = (data:object) => {
    return axios.post(`${baseURL}deleteFile`,data);
}

//根据url删除文件
export const deleteFileByUrlApi = (data:object) => {
    return axios.post(`${baseURL}deleteFileByUrl`,data);
}


//获取文件
export const getFileApi = (data:object) => {
    return axios.post(`${baseURL}getFile`,data);
}

//改变文件的分组
export const removeFileApi = (data:object) => {
    return axios.post(`${baseURL}removeFile`,data);
}